<%@ include file="/WEB-INF/jsp/includes/include.jsp" %>

<c:if test="${loggedInUser != null}">
<!-- BEGIN MENUBAR -->
<div class="yui-skin-sam" id="yahoo-com">
	<div id="menubar" class="yuimenubar yuimenubarnav">
		<div class="bd">
			<ul class="first-of-type">
				<li class="yuimenubaritem first-of-type">
					<a class="yuimenubaritemlabel" href="<c:url value="/index.jsp" />">Home</a>
				</li>
				<li class="yuimenubaritem">
					<a class="yuimenubaritemlabel" href="<c:url value="/user/list.html" />">Users</a>
					<div id="shopping" class="yuimenu">
						<div class="bd">                    
							<ul>
								<c:choose>
									<c:when test="${!empty loggedInUser}">
										<c:url scope="page" value="/user/profile.html" var="userProfileURL">
											<c:param name="id" value="${loggedInUser.id}"/>
										</c:url>
										<c:url scope="page" value="/user/editprofile.html" var="userEditProfileURL">
											<c:param name="id" value="${loggedInUser.id}"/>
										</c:url>
										<c:url scope="page" value="/user/list.html" var="userNetworkListURL">
											<c:param name="id" value="${loggedInUser.id}"/>
										</c:url>
										<c:url scope="page" value="/user/invite.html" var="userInviteURL">
											<c:param name="id" value="${loggedInUser.id}"/>
										</c:url>
										<li class="yuimenuitem">
											<a class="yuimenuitemlabel" href="${userProfileURL}">View my profile</a>
										</li>
										<li class="yuimenuitem">
											<a class="yuimenuitemlabel" href="${userEditProfileURL}">Edit my profile</a>
										</li>
										<li class="yuimenuitem">
											<a class="yuimenuitemlabel" href="${userNetworkListURL}">View my volunteer network</a>
										</li>
										<li class="yuimenuitem">
											<a class="yuimenuitemlabel" href="<c:url value="/user/search.html" />">Search for volunteers</a>
										</li>
										<li class="yuimenuitem">
											<a class="yuimenuitemlabel" href="${userInviteURL}">Invite a friend</a>
										</li>
									</c:when>
									<c:otherwise>
										<li class="yuimenuitem">
											<a class="yuimenuitemlabel" href="<c:url value="/user/login.html" />">Login</a>
										</li>
										<li class="yuimenuitem">
											<a class="yuimenuitemlabel" href="<c:url value="/user/register.html" />">Register</a>
										</li>
									</c:otherwise>
								</c:choose>
							</ul>
						</div>
					</div>                    
				</li>
				
				<li class="yuimenubaritem">
					<a class="yuimenubaritemlabel" href="<c:url value="/organisation/list.html" />">Organisations</a>
					<div id="entertainment" class="yuimenu">
						<div class="bd">                    
							<ul>
								<li class="yuimenuitem">
									<a class="yuimenuitemlabel" href="<c:url value="/organisation/list.html" />">View my organisations network</a>
								</li>
								<li class="yuimenuitem">
									<a class="yuimenuitemlabel" href="<c:url value="/organisation/search.html" />">Search for organisations</a>
								</li>
								<li class="yuimenuitem">
									<a class="yuimenuitemlabel" href="<c:url value="/organisation/register.html" />">Create an organisation</a>
								</li>
								<li class="yuimenuitem">
									<a class="yuimenuitemlabel" href="<c:url value="/organisation/invite.html" />">Invite an organisation to join</a>
								</li>
							</ul>                    
						</div>
					</div>                                        
				</li>
	
				<li class="yuimenubaritem">
					<a class="yuimenubaritemlabel" href="<c:url value="/project/list.html" />">Projects</a>
					<div id="information" class="yuimenu">
						<div class="bd">                                        
							<ul>
								<li class="yuimenuitem">
									<a class="yuimenuitemlabel" href="<c:url value="/project/list.html" />">View my projects network</a>
								</li>
								<li class="yuimenuitem">
									<a class="yuimenuitemlabel" href="<c:url value="/project/search.html" />">Search for projects</a>
								</li>
								<li class="yuimenuitem">
									<a class="yuimenuitemlabel" href="<c:url value="/project/register.html" />">Create a project</a>
								</li>
								<li class="yuimenuitem">
									<a class="yuimenuitemlabel" href="<c:url value="/project/invite.html" />">Invite a project to join</a>
								</li>
							</ul>
						</div>
					</div>                                        
				</li>
				
			</ul>            
		</div>
	</div>
</div>	                        
<!-- END MENUBAR -->
</c:if>